<?php
class Factory
{
    public static function manufacture($class)
    {
        if (include_once 'class.' . strtolower($class) . '.php') {
            $classname = $class;
            return new $classname;
        } else {
            require_once('class.logger.php');
            $logger = new Logger;
            $message = "Class not found: ". $class;
            $logger->log($message);
        }
    }
}
?>
